import zhaxios from "@/api/axios";
export default {
  /**
   * @description: 种养总面积
   * @return {Object}
   */
  getTotalArea() {
    return zhaxios.post("v3/batch/productionBatch/queryTotalArea", {
      "status": 0,
      organizationNo: sessionStorage.organizationNo
    });
  },
  /**
   * @description: 当前所有种养批次
   * @return {Object}
   */
  getAllBatch() {
    return zhaxios.post("v3/batch/productionBatch/queryByCondition", {
      "status": 0,
      organizationNo: sessionStorage.organizationNo
    });
  },
  /**
   * @description: 当月告警信息-饼图
   * @return {Object}
   */
  getnowmonthalarmage(params) {
    return zhaxios.get(`v3/alarm/alarmMessage/statistic?organizationNo=${sessionStorage.organizationNo}`, {
      "endTime": params.endTime || "2021-12-01 01:01:01",
      "startTime": params.startTime || "2020-12-01 01:01:01",
      "system": "SC"
    })
  },
  /**
   * @description: 批次告警次数
   * @return {Object}
   */
  getBatchAlarmNumber(params) {
    return zhaxios.get("v3/alarm/alarmMessage/chart/SC")
  },
  /**
   * @description: 料肥统计表格数据
   * @return {Object}
   */
  getliaofeilist(params) {
    return zhaxios.post("v3/inputs/inputsRecord/queryPageByCondition", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 农事任务信息echart
   * @return {Object}
   */
  farmtaskdataechart(params) {
    return zhaxios.get("v3/agriculturalTask/agriculturalTask/findTask", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 农事任务信息详细信息  { 'condition':'[{ 'batchNo':'1' , 'startTime':'开始时间' , 'endTime':'结束时间' ,'agriculturalWorkTypeId':'1'
   * @return {Object}
   */
  farmtaskdataemessage(params) {
    return zhaxios.post("v3/agriculturalTask/agriculturalTask/queryByConditionAndTime", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 农资投入信息echart
   * @return {Object}
   */
  farmsourceinputechart(params) {
    return zhaxios.get("v3/inputs/inputsRecord/queryInfoByCondition", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 条件查询批次详细信息
   * @return {Object}
   */
  getbycondBatch(params) {
    return zhaxios.post("v3/batch/productionBatch/queryByCondition", {
      // "status": false,
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 条件查询告警信息
   * @return {Object}
   */
  getalarmmessage(params) {
    return zhaxios.post("v3/alarm/alarmMessage/queryByCondition", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 条件查询告警信息分页查十条
   * @return {Object}
   */
  getalarmmessagetwo(params) {
    return zhaxios.post("v3/alarm/alarmMessage/queryPageList", {
      page: 1,
      size: 10,
      entity: {
        ...params,
        organizationNo: sessionStorage.organizationNo
      }
    })
  },
  /**
   * @description: 查询当月农事任务占比饼图
   * @return {Object}
   */
  getnowmonthfarmtaskpie(params) {
    return zhaxios.get("v3/agriculturalTask/agriculturalTask/findAgricultural", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 查询当月处理结果数量
   * @return {Object}
   */
  getnowmonthhandingtasknum(params) {
    return zhaxios.get("v3/agriculturalTask/agriculturalTask/findMonthResult", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 查询即将逾期的任务
   * @return {Object}
   */
  getoldtasklist(params) {
    return zhaxios.get("v3/agriculturalTask/agriculturalTask/findOverdue", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 查询即将逾期的任务
   * @return {Object}
   */
  getWorkbenchlist(params) {
    return zhaxios.post("v3/alarm/alarmMessage/workbench", {
      ...params,
      "system": "SC",
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 查询即将逾期的任务
   * @return {Object}
   */
  getagriculturalTaskbenchlist(params) {
    return zhaxios.get(`v3/agriculturalTask/agriculturalTask/displayedByHistogram?no=${sessionStorage.organizationNo}`, {
      ...params,
      "system": "SC",
      organizationNo: sessionStorage.organizationNo
    })
  },
  /**
   * @description: 条件查询告警信息分页查十条
   * @return {Object}
   */
  getagriculturalTasktwo(params) {
    return zhaxios.get(`v3/agriculturalTask/agriculturalTask/queryByAccount?account=${sessionStorage.account}`, {
      ...params,
      "system": "SC",
      organizationNo: sessionStorage.organizationNo
    })
  }
}
